﻿<phone:PhoneApplicationPage
    x:Class="Studio77.RuneMaster.Pages.ModeSelectPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ButtonStyleEasy" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderThickness="3" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
								<Border.RenderTransform>
									<CompositeTransform/>
								</Border.RenderTransform>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF6A5302" Offset="0"/>
										<GradientStop Color="#FFFFF0AE" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>
								<Border.BorderBrush>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFB9B9B9" Offset="1"/>
										<GradientStop Color="#FFE8E8E8"/>
									</LinearGradientBrush>
								</Border.BorderBrush>
								<Image Width="125" VerticalAlignment="Center" Stretch="Fill" Source="/Images/easy.png" Margin="0" Height="40" HorizontalAlignment="Center"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleNormal" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="border">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<SolidColorBrush Color="#99939393"/>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderThickness="3" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
								<Border.RenderTransform>
									<CompositeTransform/>
								</Border.RenderTransform>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF005306" Offset="0"/>
										<GradientStop Color="#FFB2FFAE" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>
								<Border.BorderBrush>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFB9B9B9" Offset="1"/>
										<GradientStop Color="#FFE8E8E8"/>
									</LinearGradientBrush>
								</Border.BorderBrush>
								<Image x:Name="image" Margin="0" Source="/Images/normal.png" Stretch="Fill" Width="226" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleHard" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="border">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<SolidColorBrush Color="#99939393"/>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderThickness="3" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
								<Border.RenderTransform>
									<CompositeTransform/>
								</Border.RenderTransform>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF2B0000" Offset="0"/>
										<GradientStop Color="#FFFF3F3F" Offset="1"/>
									</LinearGradientBrush>
								</Border.Background>
								<Border.BorderBrush>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFB9B9B9" Offset="1"/>
										<GradientStop Color="#FFE8E8E8"/>
									</LinearGradientBrush>
								</Border.BorderBrush>
								<Image x:Name="image" Source="/Images/hard.png" Stretch="Fill" Width="147" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>
		<Grid x:Name="LayoutRoot" Height="800" Width="480">
			<Image Source="/Images/gamemodebg.png" Stretch="Fill" d:IsLocked="True"/>
			<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
				<Button Click="btnEasy_Click_1" x:Name="btnEasy" Content="Button" HorizontalAlignment="Center" Height="86" Style="{StaticResource ButtonStyleEasy}" VerticalAlignment="Top" Width="302"/>
				<Button Click="btnNormal_Click_1" IsEnabled="False" x:Name="btnNormal" Content="Button" HorizontalAlignment="Center" Height="86" Style="{StaticResource ButtonStyleNormal}" VerticalAlignment="Top" Width="302" Margin="0,80,0,0"/>
                <Button Click="btnHard_Click_1" IsEnabled="False" x:Name="btnHard" Content="Button" HorizontalAlignment="Center" Height="86" Style="{StaticResource ButtonStyleHard}" VerticalAlignment="Top" Width="302" Margin="0,80,0,0"/>
       
			</StackPanel>
       
		</Grid>

	</Viewbox>

</phone:PhoneApplicationPage>